home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / capturing / digitizershell / macmain.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.1 KB  |  77 lines

  1. /*
  2.     File:        MacMain.c
  3.  
  4.     Contains:    Simple test shell for testing Digitizers.
  5.  
  6.     Written by:     
  7.  
  8.     Copyright:    Copyright © 1994-1999 by Apple Computer, Inc., All Rights Reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.                 7/28/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  20.                 
  21.  
  22. */
  23.  
  24. // INCLUDES
  25. #include <stdio.h>
  26.  
  27. #ifdef __MWERKS__
  28. #include <sioux.h>
  29. #endif // __MWERKS__
  30.  
  31. #include "DTSQTUtilities.h"
  32. #include "MacFramework.h"
  33.  
  34.  
  35. // MAIN
  36. // ______________________________________________________________________
  37. void main(void)
  38. {
  39.     OSErr anErr = noErr;
  40.  
  41. // This is for controlling the sioux window under Metrowerks (5.0 forward)
  42. #ifdef USESIOUX    
  43.     SIOUXSettings.initializeTB = false;
  44.     SIOUXSettings.setupmenus = false;
  45.     SIOUXSettings.standalone = false;
  46.     SIOUXSettings.asktosaveonclose = true;
  47. #endif // USESIOUX    
  48.  
  49.     InitStack(10*1024L);                        // Add 10k more to the stack, for possible QD and Sound Manager needs
  50.     InitMacEnvironment(10L);                    // 10 * MoreMasters
  51.     InitMenubar();
  52.     
  53.     if( !QTUIsQuickTimeInstalled() )
  54.     {
  55.         ShowWarning("\pQuickTime is not installed on this system -- we will exit!", 0);
  56.         ExitToShell();
  57.     }
  58. #if powerc    
  59.     if( !QTUIsQuickTimeCFMInstalled() )
  60.     {
  61.         ShowWarning("\pThe QuickTime PowerPlug file is not available -- we will exit!", 0);
  62.         ExitToShell();                                // I could disable features as well.
  63.     }
  64. #endif // powerc
  65.  
  66.     anErr = EnterMovies(); DebugAssert(anErr == noErr);
  67.     if(anErr != noErr)
  68.     {
  69.         ShowWarning("\pWe have problems initializing the QuickTime environment (exit): ", anErr);
  70.         ExitToShell();
  71.     }
  72.  
  73.     printf("Digitizer Shell -- for testing of Quicktime Digitizer functionality.\n");
  74.  
  75.     MainEventLoop();
  76. }
  77.